Split Method for a string in c